
MYSQL_CONN_POOL_TEST_CPPFILE = mysql_conn_pool_test.cpp
MYSQL_CONN_POOL_TEST_TARGET = mysql_conn_pool_test 
MYSQL_CONN_POOL_TEST_OBJFILE = $(patsubst %.cpp, %.o, $(MYSQL_CONN_POOL_TEST_CPPFILE))


TARGETS = $(MYSQL_TEST_TARGET) $(MYSQL_CONN_POOL_TEST_TARGET)

CXX = g++
INC_DIR = -I../../../3party/mysql/include -I../../../3party/log4cxx/include -I../../smysql/include -I../../sutil/include

LIBS =  -L../../../3party/mysql/lib -L../../../lib -lmysqlclient_r -L../../../3party/log4cxx/lib -lsutil -lsmysql -llog4cxx

CXXFLAGS = -g -Wall -O2 -pthread

.PHONY : all

all: $(TARGETS) 


$(MYSQL_CONN_POOL_TEST_TARGET): $(MYSQL_CONN_POOL_TEST_OBJFILE)
	        $(CXX) $(CXXFLAGS) $^ $(LIBS) -o $@

%.o : %.cpp
	        $(CXX) -c $(CXXFLAGS) $(INC_DIR) $< -o $@

.PHONY : clean

clean:
	        rm -f *.o $(TARGET)
